package com.sg.business.taskforms.engineeringchange;

import com.mongodb.BasicDBObject;
import com.sg.business.model.IModelConstants;
import com.sg.business.model.Work;
import com.sg.widgets.commons.dataset.ContextSingleDataSetFactory;

public class EngineeringChangeRelatedWorkDataSet extends
		ContextSingleDataSetFactory {

	public EngineeringChangeRelatedWorkDataSet() {
		super(IModelConstants.DB, IModelConstants.C_WORK);
		String consignerId = getContext().getAccountInfo().getConsignerId();
		setQueryCondition(new BasicDBObject()
				.append(Work.F_INTERNAL_TYPE, Work.INTERNAL_TYPE_CHANGE)
				.append(Work.F_CHARGER, consignerId)
				.append(Work.F_PARENT_ID, null));
	}

}
